package com.itheima.dao;

import com.itheima.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface UserMapper {

    List<User> selectAll();

    //模糊查询
    List<User> selectLikeCondition1(String username);
    List<User> selectLikeCondition2(String username);

    //多条件或多参数查询的三种方式
    public List<User> findByPage1(Integer startIndex, Integer pageSize);
    public List<User> findByPage2(@Param("startIndex") Integer startIndex, @Param("pageSize") Integer pageSize);
    public List<User> findByPage3(Map<String,Object> map);

    //添加一条数据
    void insert(User user);

    //根据性别查询信息
    public List<User> selectByCondition(String sex);


}
